package cn.tedu.io;

import java.io.BufferedInputStream;
import java.io.IOException;
import java.io.InputStream;
//IO练习  读取键盘输入的数据并打印
public class Test4 {
    public static void main(String[] args) {
        InputStream in=null;
        try {
        //.创建读取流
        in=new BufferedInputStream(System.in);
        //2.开始读取
        int b =0;
        while (true){

                if (!((b=in.read())!=-1)) break;
            System.out.println(b);
        }
            } catch (IOException e) {
                e.printStackTrace();
            }finally {
            //3.释放资源
            IOUtils.close(in);
        }
    }
}
